#pragma once

#include "GeoExport.h"
#include "Types.h"

class HalfEdge;
class Mesh;

class Edge {
public:
    Edge(Mesh* mesh);
    ~Edge() = default;

    ID id() const { return _id; }

    Mesh* mesh() const { return _mesh; }

    HalfEdge* halfEdge1() const { return _halfEdge1; }
    void setHalfEdge1(HalfEdge* he) { _halfEdge1 = he; }

    HalfEdge* halfEdge2() const { return _halfEdge2; }
    void setHalfEdge2(HalfEdge* he) { _halfEdge2 = he; }

private:
    ID _id;
    Mesh* _mesh = nullptr;
    HalfEdge* _halfEdge1 = nullptr; // 边的一个半边
    HalfEdge* _halfEdge2 = nullptr; // 边的另一个半边
};